home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 050 / monowndo.pas < prev    next >
Pascal/Delphi Source File  |  1985-05-30  |  2KB  |  77 lines

  1. Program News;
  2.  
  3. TYPE
  4.     Titles   = string[79];
  5.  
  6. VAR
  7.     m,x       : integer;
  8.  
  9. PROCEDURE Border (x1,y1,x2,y2:Integer; Title: Titles);
  10. BEGIN
  11.   Window (x1,y1,x2,y1+1);
  12.   Gotoxy(1,1);
  13.   x := x2-x1;
  14.   Write('╔');
  15.   IF length(title) > x THEN title[0] := chr(x-4);
  16.   Write(title);
  17.   FOR m := x1 + length(title)+1 to x2-1 DO Write('═');
  18.   Write('╗');
  19.   FOR m := 2 to y2-y1 DO
  20.     BEGIN
  21.       Window(x1,y1,x2,y1+m+1);
  22.       Gotoxy(1,m);
  23.       Write ('║');
  24.       Gotoxy(x2-x1+1,m);
  25.       Write ('║');
  26.     END;
  27.   Window(x1,y1,x2,y2+1);
  28.   Gotoxy(1,y2-y1+1);
  29.   Write('╚');
  30.   FOR m := x1+1 to x2-1 DO Write('═');
  31.   Write('╝');
  32. END;
  33. {==============================================}
  34. PROCEDURE Box (x1,y1,x2,y2:integer; title: Titles);
  35. BEGIN
  36.   Border(x1,y1,x2,y2,title);
  37.   Window(x1+1,y1+1,x2-1,y2-1);
  38.   Clrscr;
  39. END;
  40. {================================================}
  41. BEGIN
  42. Box (4,1,66,5,' Box 1 ');
  43. Gotoxy(1,2);
  44. Write('Would you like to put windows in your TURBO PASCAL programs?');
  45. Delay(2000);
  46. Box (1,8,25,14,' Box 2 ');
  47. Gotoxy(3,3);
  48. Write ('It is quite simple.');
  49. Delay(2000);
  50. Box (26,8,79,14,' Box 3 ');
  51. Gotoxy(3,3);
  52. Write('  All you have to do is list this program.');
  53. Delay(2000);
  54. Box (1,15,79,24,' Box 4 ');
  55. Gotoxy(1,4);
  56. Write('The subroutine that generates these windows can be copied into your program.');
  57. Delay(3500);
  58. Box (10,10,70,15,'══════════════════════ FIFTH BOX ');
  59. Writeln;
  60. Write('            That is all there is to it!!');
  61. Gotoxy(1,3);
  62. Delay(3000);
  63. Writeln;
  64. Write('    Courtesy of J. Levitt, Fargo IBM-PC Users Group');
  65. Delay(3000);
  66. Box (12,17,68,20,'════════════ Final Box  ');
  67. Writeln;
  68. Write('                  Press any key to end');
  69. Repeat
  70. Until keypressed;
  71. Delay(400)
  72. END.
  73.  
  74.  
  75. ═ Final Box  ');
  76. Writeln;
  77. Write